cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
project(sphorb)

find_package(OpenCV 3.4.1 REQUIRED)

include_directories(
    ${PROJECT_SOURCE_DIR}
    ${PROJECT_SOURCE_DIR}/include
    )

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin)
#set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
#set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

add_library(${PROJECT_NAME} SHARED
    src/pfm.cpp
    src/utility.cpp
    src/detector.cpp
    src/nonmax.cpp
    src/SPHORB.cpp
    )
target_link_libraries(${PROJECT_NAME}
    ${OpenCV_LIBS}
    )

add_executable(example1 examples/example1.cpp)
target_link_libraries(example1 ${PROJECT_NAME})

add_executable(example2 examples/example2.cpp)
target_link_libraries(example2 ${PROJECT_NAME})

